package com.itheima.array;

public class Demo4array {
    public static void main(String[] args) {
        int[] arr = {11, 22, 33, 44, 55};
        int sum = 0;
        //动态获取数组长度 数组名.length
        //数组名.fori

        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
            //数组名[i].sout
            System.out.println(arr[i]);
        }
        System.out.println(sum);//soutv
    }

}
